#ifndef CVX_MATCH_H
#define CVX_MATCH_H 1

#include "cvxImage.h"

class CvxMatch
{
public:
	CvxMatch(int threshold = 50, int matchNumber = 150);
	~CvxMatch();

	void configure(int threshold, int matchNumber);
	void match(const Mat &imageA, const Mat &imageB, vector<Point2f> &ptA, vector<Point2f> &ptB);
	

private:
	FastFeatureDetector        *m_pFast;
	GridAdaptedFeatureDetector *m_pDetector;
	BriefDescriptorExtractor   *m_pExtractor;
	BFMatcher                  *m_pMatcher;
	int m_threshold;           /*increase or decrease threshold*/
	int m_desiredNumber;  /*match   number*/
	int m_maxTotalPts;    /*feature number*/
	float m_inlierRatio;

	

private:
	void tooFew();
	void tooMany();

};

#endif